<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width"/>
<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
<title>我的奖励</title>
<link rel="stylesheet" type="text/css" href="../../css/aui-flex.css" />
<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
<link rel="stylesheet" type="text/css" href="../../css/common.css" />
<style>
html,body{
  background: #E7E7E7;
}
.aui-content > div{
  /*position: absolute;
  top:50%;
  left:50%;
  -webkit-transform: translate(-50%,-50%);
  transform: translate(-50%,-50%);*/
}
.bgBox{
  position: absolute;
  height: 100%;
}
.bgBox img{
  width: 100%;
  height: 100%;
}
.footer{
  position: fixed;
  height: 2.4rem;
  line-height: 2.4rem;
  bottom: 0;
  width: 100%;
  color: #fff;
  font-size:0.7rem;
  text-align: center;
  background: #E73350;
}
</style>
</head>
<body>
  <div class="bgBox bg-pt"><img src="../../image/mine/4.jpg" alt=""></div>
  <div class="bgBox bg-vip aui-hide"><img src="../../image/mine/5.jpg" alt=""></div>
  <div class="bgBox bg-y aui-hide"><img src="../../image/mine/6.jpg" alt=""></div>
    <div style="height:2rem"></div>
  <div class="footer" tapmode onclick="openUp()">立即升级</div>
</body>
<script type="text/javascript" src="../../script/import.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript">

apiready = function(){
var userInfo = getUserinfo();
  if(userInfo.user_vip == 1){
    $$('.bg-pt').removeClass('aui-hide');
    $$('.bg-vip').addClass('aui-hide');
    $$('.bg-y').addClass('aui-hide');
  }else if(userInfo.user_vip == 2){
    $$('.bg-vip').removeClass('aui-hide');
    $$('.bg-pt').addClass('aui-hide');
    $$('.bg-y').addClass('aui-hide');
  }else if(userInfo.user_vip == 3){
    $$('.bg-y').removeClass('aui-hide');
    $$('.bg-pt').addClass('aui-hide');
    $$('.bg-vip').addClass('aui-hide');
  }
  if(api.pageParam.status == 1){
    $$('.footer').addClass('aui-hide')
  }
	api.parseTapmode();
};
function openUp(){
  api.ajax({
      url: BASE_URL + 'App/User/applyUpgrade',
      method: 'post',
      data: {
          values: {
              userid: getUserId()
          },
      }
  },function(ret, err){
      if (ret && ret.code == 1) {
        api.openFrame({
          name:'vip_invio_mask',
          url:'vip_invio_mask.html',
          rect:{
            x:'auto',
            y: 'auto',
            w: api.winWidth,
            h: api.winHeight
          },
          bounces: false,
        })
      } else {
          toast(ret.msg)
      }
  });


}
</script>
</html>
